package com.cat.model.biz.logic;

import java.sql.SQLException;
import java.util.List;

import com.cat.model.common.model.admin.AdminModuleVO;
import com.cat.model.common.model.admin.AdminRolePermissionVO;
import com.cat.model.common.model.admin.AdminRoleVO;
import com.cat.model.common.model.admin.AdminUser;
import com.cat.model.common.model.admin.AdminUserRoleVO;


public interface SystemLogic {
	
	/**
	 * 保存系统用户
	 * */
	AdminUser insertAdminUser(AdminUser vo) throws SQLException;
	
	/**
	 * 更新系统用户
	 * */
	AdminUser updateAdminUser(AdminUser vo, String... fields) throws SQLException;
	
	/**
	 * 删除系统用户
	 * */
	int deleteAdminUser(int id)throws SQLException;
	
	/**
	 * 获取系统用户
	 * */
	AdminUser getAdminUser(int id);
	
	/**
	 * 获取系统用户
	 * */
	AdminUser getAdminUserByName(String username);
	
	/**
	 * 保存菜单
	 * */
	AdminModuleVO insertAdminModule(AdminModuleVO vo) throws SQLException;
	
	/**
	 * 更新菜单
	 * */
	AdminModuleVO updateAdminModule(AdminModuleVO vo, String... fields) throws SQLException;
	
	/**
	 * 删除菜单
	 * */
	int deleteAdminModule(long id)throws SQLException;
	
	/**
	 * 获取菜单
	 * */
	AdminModuleVO getAdminModule(long id);
	
	/**
	 * 获取所有菜单
	 * */
	List<AdminModuleVO> getAllAdminModule(String sysCode);
	
	/**
	 * 保存角色
	 * */
	AdminRoleVO insertAdminRole(AdminRoleVO vo) throws SQLException;
	
	/**
	 * 更新角色
	 * */
	AdminRoleVO updateAdminRole(AdminRoleVO vo, String... fields) throws SQLException;
	
	/**
	 * 删除角色
	 * */
	int deleteAdminRole(long id)throws SQLException;
	
	/**
	 * 获取角色
	 * */
	AdminRoleVO getAdminRole(long id);
	
	/**
	 * 获取角色权限
	 * */
	AdminRolePermissionVO getAdminRolePermission(long roleId);
	
	/**
	 * 删除角色权限
	 * */
	int deleteAdminRolePermission(long id)throws SQLException;
	
	/**
	 * 更新角色权限
	 * */
	AdminRolePermissionVO updateAdminRolePermission(AdminRolePermissionVO vo, String... fields) throws SQLException;
	
	/**
	 * 保存角色权限
	 * */
	AdminRolePermissionVO insertAdminRolePermission(AdminRolePermissionVO vo) throws SQLException;
	
	/**
	 * 保存用户角色
	 * */
	AdminUserRoleVO insertAdminUserRole(AdminUserRoleVO vo) throws SQLException;
	
	/**
	 * 删除用户角色
	 * */
	int deleteAdminUserRole(long id)throws SQLException;

}
